function PageUserLogin() {
  this._account = document.getElementById('input1');
  this._password = document.getElementById('input2');
  this._loginBtn = document.getElementById('button1');
  
  this._createElements();
}

PageUserLogin.prototype._createElements = function() {
  var _self = this;
  this._loginBtn.onclick = function() { new RequestUtils()._custom('login', 'a=' + _self._account.value + '&p=' + _self._password.value, function(result, params) { if (result.type) {
                                                                                                                                                                      if (result.type == '{{$smarty.const.USER_TYPE_MANAGER_ASSISTANT|escape:javascript}}') {
                                                                                                                                                                        location.href = '?p=pageasst&t=pageb1assignwork&m1=a1&m2=b1&m3=c1';
                                                                                                                                                                      } else if (result.type == '{{$smarty.const.USER_TYPE_CUSTOMER_SERVICE|escape:javascript}}') {
                                                                                                                                                                        location.href = '?p=pageserv&t=pageb1choosedesigner&m1=a1&m2=b1&m3=c1';
                                                                                                                                                                      } else {
                                                                                                                                                                        window.alert('User Restricted');
                                                                                                                                                                      }
                                                                                                                                                                    } else {
                                                                                                                                                                      window.alert('Incorrect Account and/or Password');
                                                                                                                                                                    }
                                                                                                                                                                  }, null);
                                     };
};